package cn.fntop;

import cn.fntop.config.FilterFileConfig;
import cn.fntop.config.ToEmail;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableScheduling;


/**
 * @author fn
 * @description
 * @date 2023/3/12 14:15
 */
@SpringBootApplication
@EnableScheduling
@EnableConfigurationProperties({ToEmail.class})
public class FnEmailListenApplication {
    private static FilterFileConfig filterFileConfig;

    @Autowired
    public void setFilterFileConfig(FilterFileConfig filterFileConfig) {
        FnEmailListenApplication.filterFileConfig = filterFileConfig;
    }

    public static void main(String[] args) {
        SpringApplication.run(FnEmailListenApplication.class, args);
        //设置监听文件
        filterFileConfig.FileFilter();
    }
}
